/*
 * Copyright (C) 2015-2019 Alibaba Group Holding Limited
 */

#ifndef CO_MASTER_CORE__H_
#define CO_MASTER_CORE__H_
#include <stdint.h>
#include <stdbool.h>

typedef enum {
    co_master_core_reset_all,
    co_master_core_sdo,
} co_master_core_event_t;

typedef struct {
    co_master_core_event_t event;
    uint8_t                length;
} co_master_core_event_header_t;

#define CO_MASTER_CORE_EVENT_PARAM_MAX_LEN 32
#define CO_MASTER_EVENT_QUEUE_SIZE         64

#define CO_MASTER_CORE_STACK_SIZE 2048

#ifdef __cplusplus
extern "C" {
#endif

int32_t co_master_core_init(void);

int32_t co_master_notify(const co_master_core_event_t type, const uint8_t len, const void *param);

#ifdef __cplusplus
}
#endif

#endif /* CO_MASTER_CORE__H_ */
